//
//  main.c
//  strcpy实现
//
//  Created by 卜绎皓 on 2022/2/28.
//

#include <stdio.h>
#include <assert.h>

char* my_strcpy(char* str1,char* str2){
    char* ret = str1;
    assert(str1!=NULL);
    assert(str2!=NULL);
    while ((*str1++ = *str2++)) {
        ;
    }
    return ret;
}

int main(){
    char a1[] = "aaaaaa";
    char a2[] = "bbbbb";
    printf("%s",my_strcpy(a1,a2));
    return 0;
}
